<template>
  <div>
    <OrgTree :data.sync="data" :horizontal="true" @on-node-click="onNodeClick" />
  </div>
</template>
<script>
import data from './config'
export default {
  name: 'BackManage',
  components: {
    OrgTree: () => import('@/components/OrgTree')
  },
  data: () => ({
    data
  }),
  mounted() {
    this.$store.dispatch('party/initDictionary')
  },
  methods: {
    onNodeClick(e, data) {
      if (data.click) {
        this.$router.push({
          path: data.path
        })
        return
      }
      this.$notify.info({
        title: '提示',
        message: data.label + '管理功能暂未开放'
      })
    }
  }
}
</script>
<style scoped>
@import './style.css';
</style>
